﻿@using JinRi.Services.Helpers

<form novalidate action="@Url.Action(Html.CurrentAction())" method="post">
    <div class="box box-warning">
        <div class="box-body">
            <div class="form-group">
                <label>标题</label>
                <input type="text" class="form-control" name="Title" required placeholder="标题" value="@Model.Title" />
            </div>
            <div class="form-group">
                <label>类型</label>
                <div class="radio">
                    <input type="radio" name="Category" id="radio1" @(Model.Category == 0 ? "checked" : string.Empty) value="0">
                    <label for="radio1">
                        新闻
                    </label>
                </div>
                <div class="radio">
                    <input type="radio" name="Category" id="radio2" @(Model.Category == 1 ? "checked" : string.Empty) value="1">
                    <label for="radio2">
                        公告
                    </label>
                </div>
            </div>
            <div class="form-group">
                <label>内容</label>
                <textarea id="container" name="Content" style="width:100%;height:400px;">@Html.Raw(Model.Content)</textarea>
            </div>

        </div><!-- /.box-body -->
        <div class="box-footer">
            @Html.AntiForgeryToken()
            <div class="bg-danger">
                @Html.ValidationSummary(true)
            </div>
            <button type="submit" class="btn btn-primary">保存</button>
            <a href="@Url.Action("List")" class="btn btn-default">返回</a>
        </div>
    </div><!-- /.box -->
</form>
